<template>
  <div class="replenishRecord">
    <!-- 标签页 -->
    <van-tabs
      @click="onClick"
      title-active-color="#1F0D44"
      title-inactive-color="#665E75"
    >
      <van-tab title="我的记录">
        <div class="item" v-for="(item, index) in 10" :key="index">
          <div class="left">
            <img src="https://img.yzcdn.cn/vant/cat.jpeg" />
          </div>
          <div class="right">
            <div class="top">
              <span>早班火车</span>
              <span>¥3459.00</span>
            </div>
            <div class="bottom">
              <span>补货时间:2020/09/23</span>
              <span>货款金额</span>
            </div>
          </div>
        </div>
      </van-tab>
      <van-tab title="粉丝记录">
        <div class="item" v-for="(item, index) in 10" :key="index">
          <div class="left">
            <img src="https://img.yzcdn.cn/vant/cat.jpeg" />
          </div>
          <div class="right">
            <div class="top">
              <span>早班火车</span>
              <span>¥3459.00</span>
            </div>
            <div class="bottom">
              <span>补货时间:2020/09/23</span>
              <span>货款金额</span>
            </div>
          </div>
        </div>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
export default {
  name: 'replenishRecord',
  methods: {
    onClick(name, title) {
      this.selectName = title
      this.$toast(title)
    }
  }
}
</script>

<style lang="less" scoped>
.replenishRecord {
  background-color: #f7f6fb;
  .van-tabs {
    // position: fixed;
    // top: 0px;
    ::v-deep {
      .van-tabs__wrap {
        height: 44px;
      }
      .van-tab--active {
        font-size: 14px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #1f0d44;
      }
      .van-tabs__line {
        width: 16px;
        height: 3px;
        background: linear-gradient(135deg, #ff5bf4 0%, #622ccc 100%);
        border-radius: 2px;
        position: absolute;
        top: 35px;
      }
      .van-tabs__content {
        background-color: #f7f6fb;
        padding-top: 1px;
      }
    }
  }
  .item {
    padding: 0 12px;
    width: 100%;
    height: 74px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: #fff;
    .left {
      margin-right: 12px;
      width: 44px;
      height: 44px;
      img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
      }
    }
    .right {
      width: 100%;
      height: 74px;
      span {
        height: 21px;
        font-size: 15px;
        font-weight: 600;
        color: #1f0d44;
        line-height: 21px;
      }
      .top,
      .bottom {
        width: 100%;
        height: 21px;
        display: flex;
        margin-top: 15px;
        justify-content: space-between;
      }
      .bottom {
        margin-top: 6px;
        span {
          height: 16px;
          font-size: 12px;
          font-weight: 400;
          color: #afabb7;
          line-height: 16px;
        }
      }
    }
  }
}
</style>
